package com.sun.mapper;

import com.sun.pojo.User;
import org.mybatis.spring.support.SqlSessionDaoSupport;

import java.util.List;

/**
 * @Author SunBingRui
 * @Date 2020/5/16 23:48
 */
//整合方式一
public class UserMapperImpl extends SqlSessionDaoSupport implements UserMapper {

    public List<User> getUser() {
        return getSqlSession().getMapper(UserMapper.class).getUser();
    }

    public int addUser(User user) {
        return getSqlSession().getMapper(UserMapper.class).addUser(user);
    }

    public int deleteUser(int id) {
        return getSqlSession().getMapper(UserMapper.class).deleteUser(id);
    }
}
